<template>
    <div class="content">

    </div>
</template>

<script setup>
import { getNewsList } from '@/api/viewapi.js'
import { base64Img } from '@/tools/tools.js'
import { ref, reactive, onMounted } from 'vue'
import router from '@/router/index.js';
const index = ref(0)
const newsList = ref([])
const chanpinList = ref([])

const _getNewsList = () => {
    getNewsList().then((res) => {
        console.log('新闻数据', res);
        newsList.value = res.data.newslist
        chanpinList.value = res.data.chanpinlist
    })
}

// 跳转详情
const gotoXiangqing = (checkid, newsid) => {
    router.push({
        path: '/newsmessage', query: {
            checkid: checkid, newsid
        }
    })
}


const click = (i) => {
    index.value = i
}

onMounted(() => {
    _getNewsList()
});

</script>

<style lang="scss" scoped>
/* pc */
@media (min-width: 800px) {
    
}

/* phone */
@media screen and (max-width: 799px) {
    
}
</style>